3.15.67 \(\int \frac {(1-x) \sqrt {1+x}}{1+x^2} \, dx\) [1467]

3.15.67.1 Optimal result
3.15.67.2 Mathematica [C] (verified)
3.15.67.3 Rubi [A] (verified)
3.15.67.4 Maple [A] (verified)
3.15.67.5 Fricas [C] (verification not implemented)
3.15.67.6 Sympy [F]
3.15.67.7 Maxima [F]
3.15.67.8 Giac [A] (verification not implemented)
3.15.67.9 Mupad [B] (verification not implemented)

3.15.67.1 Optimal result

Integrand size = 20, antiderivative size = 202 \[ \int \frac {(1-x) \sqrt {1+x}}{1+x^2} \, dx=-2 \sqrt {1+x}-\sqrt {1+\sqrt {2}} \arctan \left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {1+x}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )+\sqrt {1+\sqrt {2}} \arctan \left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+x}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )-\frac {\log \left (1+\sqrt {2}+x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )}{2 \sqrt {1+\sqrt {2}}}+\frac {\log \left (1+\sqrt {2}+x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )}{2 \sqrt {1+\sqrt {2}}} \]

output
-2*(1+x)^(1/2)-1/2*ln(1+x+2^(1/2)-(1+x)^(1/2)*(2+2*2^(1/2))^(1/2))/(1+2^(1 
/2))^(1/2)+1/2*ln(1+x+2^(1/2)+(1+x)^(1/2)*(2+2*2^(1/2))^(1/2))/(1+2^(1/2)) 
^(1/2)-arctan((-2*(1+x)^(1/2)+(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^(1/2))*( 
1+2^(1/2))^(1/2)+arctan((2*(1+x)^(1/2)+(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2)) 
^(1/2))*(1+2^(1/2))^(1/2)
 
3.15.67.2 Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.16 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.33 \[ \int \frac {(1-x) \sqrt {1+x}}{1+x^2} \, dx=-2 \sqrt {1+x}+\sqrt {2+2 i} \arctan \left (\sqrt {-\frac {1}{2}-\frac {i}{2}} \sqrt {1+x}\right )+\sqrt {2-2 i} \arctan \left (\sqrt {-\frac {1}{2}+\frac {i}{2}} \sqrt {1+x}\right ) \]

input
Integrate[((1 - x)*Sqrt[1 + x])/(1 + x^2),x]
 
output
-2*Sqrt[1 + x] + Sqrt[2 + 2*I]*ArcTan[Sqrt[-1/2 - I/2]*Sqrt[1 + x]] + Sqrt 
[2 - 2*I]*ArcTan[Sqrt[-1/2 + I/2]*Sqrt[1 + x]]
 
3.15.67.3 Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.17, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.450, Rules used = {653, 27, 484, 1407, 1142, 25, 1083, 217, 1103}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(1-x) \sqrt {x+1}}{x^2+1} \, dx\)

\(\Big \downarrow \) 653

\(\displaystyle \int \frac {2}{\sqrt {x+1} \left (x^2+1\right )}dx-2 \sqrt {x+1}\)

\(\Big \downarrow \) 27

\(\displaystyle 2 \int \frac {1}{\sqrt {x+1} \left (x^2+1\right )}dx-2 \sqrt {x+1}\)

\(\Big \downarrow \) 484

\(\displaystyle 4 \int \frac {1}{(x+1)^2-2 (x+1)+2}d\sqrt {x+1}-2 \sqrt {x+1}\)

\(\Big \downarrow \) 1407

\(\displaystyle 4 \left (\frac {\int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-\sqrt {x+1}}{x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}}{4 \sqrt {1+\sqrt {2}}}+\frac {\int \frac {\sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {x+1}\)

\(\Big \downarrow \) 1142

\(\displaystyle 4 \left (\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \int \frac {1}{x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}-\frac {1}{2} \int -\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {x+1}}{x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}}{4 \sqrt {1+\sqrt {2}}}+\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \int \frac {1}{x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}+\frac {1}{2} \int \frac {2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {x+1}\)

\(\Big \downarrow \) 25

\(\displaystyle 4 \left (\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \int \frac {1}{x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}+\frac {1}{2} \int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {x+1}}{x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}}{4 \sqrt {1+\sqrt {2}}}+\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \int \frac {1}{x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}+\frac {1}{2} \int \frac {2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {x+1}\)

\(\Big \downarrow \) 1083

\(\displaystyle 4 \left (\frac {\frac {1}{2} \int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {x+1}}{x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}-\sqrt {2 \left (1+\sqrt {2}\right )} \int \frac {1}{-x+2 \left (1-\sqrt {2}\right )-1}d\left (2 \sqrt {x+1}-\sqrt {2 \left (1+\sqrt {2}\right )}\right )}{4 \sqrt {1+\sqrt {2}}}+\frac {\frac {1}{2} \int \frac {2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}-\sqrt {2 \left (1+\sqrt {2}\right )} \int \frac {1}{-x+2 \left (1-\sqrt {2}\right )-1}d\left (2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}\right )}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {x+1}\)

\(\Big \downarrow \) 217

\(\displaystyle 4 \left (\frac {\frac {1}{2} \int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {x+1}}{x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}+\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {x+1}-\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{4 \sqrt {1+\sqrt {2}}}+\frac {\frac {1}{2} \int \frac {2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1}d\sqrt {x+1}+\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {x+1}\)

\(\Big \downarrow \) 1103

\(\displaystyle 4 \left (\frac {\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {x+1}-\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )-\frac {1}{2} \log \left (x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1\right )}{4 \sqrt {1+\sqrt {2}}}+\frac {\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )+\frac {1}{2} \log \left (x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1\right )}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {x+1}\)

input
Int[((1 - x)*Sqrt[1 + x])/(1 + x^2),x]
 
output
-2*Sqrt[1 + x] + 4*((Sqrt[(1 + Sqrt[2])/(-1 + Sqrt[2])]*ArcTan[(-Sqrt[2*(1 
 + Sqrt[2])] + 2*Sqrt[1 + x])/Sqrt[2*(-1 + Sqrt[2])]] - Log[1 + Sqrt[2] + 
x - Sqrt[2*(1 + Sqrt[2])]*Sqrt[1 + x]]/2)/(4*Sqrt[1 + Sqrt[2]]) + (Sqrt[(1 
 + Sqrt[2])/(-1 + Sqrt[2])]*ArcTan[(Sqrt[2*(1 + Sqrt[2])] + 2*Sqrt[1 + x]) 
/Sqrt[2*(-1 + Sqrt[2])]] + Log[1 + Sqrt[2] + x + Sqrt[2*(1 + Sqrt[2])]*Sqr 
t[1 + x]]/2)/(4*Sqrt[1 + Sqrt[2]]))
 

3.15.67.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 217
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( 
-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & 
& (LtQ[a, 0] || LtQ[b, 0])
 

rule 484
Int[1/(Sqrt[(c_) + (d_.)*(x_)]*((a_) + (b_.)*(x_)^2)), x_Symbol] :> Simp[2* 
d   Subst[Int[1/(b*c^2 + a*d^2 - 2*b*c*x^2 + b*x^4), x], x, Sqrt[c + d*x]], 
 x] /; FreeQ[{a, b, c, d}, x]
 

rule 653
Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), 
 x_Symbol] :> Simp[g*((d + e*x)^m/(c*m)), x] + Simp[1/c   Int[(d + e*x)^(m 
- 1)*(Simp[c*d*f - a*e*g + (g*c*d + c*e*f)*x, x]/(a + c*x^2)), x], x] /; Fr 
eeQ[{a, c, d, e, f, g}, x] && FractionQ[m] && GtQ[m, 0]
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 1103
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, 
e}, x] && EqQ[2*c*d - b*e, 0]
 

rule 1142
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[(2*c*d - b*e)/(2*c)   Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) 
Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
 

rule 1407
Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[a/ 
c, 2]}, With[{r = Rt[2*q - b/c, 2]}, Simp[1/(2*c*q*r)   Int[(r - x)/(q - r* 
x + x^2), x], x] + Simp[1/(2*c*q*r)   Int[(r + x)/(q + r*x + x^2), x], x]]] 
 /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && NegQ[b^2 - 4*a*c]
 
3.15.67.4 Maple [A] (verified)

Time = 1.15 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.35

method result size
derivativedivides \(-2 \sqrt {1+x}+\frac {\left (\sqrt {2+2 \sqrt {2}}\, \sqrt {2}-2 \sqrt {2+2 \sqrt {2}}\right ) \ln \left (1+x +\sqrt {2}-\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right )}{4}+\frac {\left (2 \sqrt {2}+\frac {\left (\sqrt {2+2 \sqrt {2}}\, \sqrt {2}-2 \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{2}\right ) \arctan \left (\frac {2 \sqrt {1+x}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}+\frac {\left (-\sqrt {2+2 \sqrt {2}}\, \sqrt {2}+2 \sqrt {2+2 \sqrt {2}}\right ) \ln \left (1+x +\sqrt {2}+\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right )}{4}+\frac {\left (2 \sqrt {2}-\frac {\left (-\sqrt {2+2 \sqrt {2}}\, \sqrt {2}+2 \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{2}\right ) \arctan \left (\frac {2 \sqrt {1+x}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\) \(272\)
default \(-2 \sqrt {1+x}+\frac {\left (\sqrt {2+2 \sqrt {2}}\, \sqrt {2}-2 \sqrt {2+2 \sqrt {2}}\right ) \ln \left (1+x +\sqrt {2}-\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right )}{4}+\frac {\left (2 \sqrt {2}+\frac {\left (\sqrt {2+2 \sqrt {2}}\, \sqrt {2}-2 \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{2}\right ) \arctan \left (\frac {2 \sqrt {1+x}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}+\frac {\left (-\sqrt {2+2 \sqrt {2}}\, \sqrt {2}+2 \sqrt {2+2 \sqrt {2}}\right ) \ln \left (1+x +\sqrt {2}+\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right )}{4}+\frac {\left (2 \sqrt {2}-\frac {\left (-\sqrt {2+2 \sqrt {2}}\, \sqrt {2}+2 \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{2}\right ) \arctan \left (\frac {2 \sqrt {1+x}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\) \(272\)
trager \(-2 \sqrt {1+x}+\operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right ) \ln \left (-\frac {1024 \operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right ) \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{4} x +192 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right ) x +160 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right )-192 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2} \sqrt {1+x}+9 \operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right ) x +15 \operatorname {RootOf}\left (\textit {\_Z}^{2}+16 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2}+1\right )+2 \sqrt {1+x}}{32 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2} x +x -1}\right )+4 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right ) \ln \left (-\frac {2048 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{5} x -128 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{3} x -320 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{3}+96 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2} \sqrt {1+x}+2 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right ) x +10 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )+7 \sqrt {1+x}}{32 \operatorname {RootOf}\left (512 \textit {\_Z}^{4}+32 \textit {\_Z}^{2}+1\right )^{2} x +x +1}\right )\) \(417\)
risch \(-2 \sqrt {1+x}-\frac {\ln \left (1+x +\sqrt {2}+\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}\, \sqrt {2}}{4}+\frac {\ln \left (1+x +\sqrt {2}+\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{2}+\frac {\arctan \left (\frac {2 \sqrt {1+x}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \left (2+2 \sqrt {2}\right ) \sqrt {2}}{2 \sqrt {-2+2 \sqrt {2}}}-\frac {\arctan \left (\frac {2 \sqrt {1+x}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \left (2+2 \sqrt {2}\right )}{\sqrt {-2+2 \sqrt {2}}}+\frac {2 \arctan \left (\frac {2 \sqrt {1+x}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{\sqrt {-2+2 \sqrt {2}}}+\frac {\ln \left (1+x +\sqrt {2}-\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}\, \sqrt {2}}{4}-\frac {\ln \left (1+x +\sqrt {2}-\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{2}+\frac {\arctan \left (\frac {2 \sqrt {1+x}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \left (2+2 \sqrt {2}\right ) \sqrt {2}}{2 \sqrt {-2+2 \sqrt {2}}}-\frac {\arctan \left (\frac {2 \sqrt {1+x}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \left (2+2 \sqrt {2}\right )}{\sqrt {-2+2 \sqrt {2}}}+\frac {2 \arctan \left (\frac {2 \sqrt {1+x}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{\sqrt {-2+2 \sqrt {2}}}\) \(429\)

input
int((1-x)*(1+x)^(1/2)/(x^2+1),x,method=_RETURNVERBOSE)
 
output
-2*(1+x)^(1/2)+1/4*((2+2*2^(1/2))^(1/2)*2^(1/2)-2*(2+2*2^(1/2))^(1/2))*ln( 
1+x+2^(1/2)-(1+x)^(1/2)*(2+2*2^(1/2))^(1/2))+(2*2^(1/2)+1/2*((2+2*2^(1/2)) 
^(1/2)*2^(1/2)-2*(2+2*2^(1/2))^(1/2))*(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^ 
(1/2)*arctan((2*(1+x)^(1/2)-(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^(1/2))+1/4 
*(-(2+2*2^(1/2))^(1/2)*2^(1/2)+2*(2+2*2^(1/2))^(1/2))*ln(1+x+2^(1/2)+(1+x) 
^(1/2)*(2+2*2^(1/2))^(1/2))+(2*2^(1/2)-1/2*(-(2+2*2^(1/2))^(1/2)*2^(1/2)+2 
*(2+2*2^(1/2))^(1/2))*(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^(1/2)*arctan((2* 
(1+x)^(1/2)+(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^(1/2))
 
3.15.67.5 Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.33 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.42 \[ \int \frac {(1-x) \sqrt {1+x}}{1+x^2} \, dx=\frac {1}{2} \, \sqrt {2 i - 2} \log \left (-\left (i - 1\right ) \, \sqrt {2 i - 2} + 2 \, \sqrt {x + 1}\right ) - \frac {1}{2} \, \sqrt {2 i - 2} \log \left (\left (i - 1\right ) \, \sqrt {2 i - 2} + 2 \, \sqrt {x + 1}\right ) + \frac {1}{2} \, \sqrt {-2 i - 2} \log \left (\left (i + 1\right ) \, \sqrt {-2 i - 2} + 2 \, \sqrt {x + 1}\right ) - \frac {1}{2} \, \sqrt {-2 i - 2} \log \left (-\left (i + 1\right ) \, \sqrt {-2 i - 2} + 2 \, \sqrt {x + 1}\right ) - 2 \, \sqrt {x + 1} \]

input
integrate((1-x)*(1+x)^(1/2)/(x^2+1),x, algorithm="fricas")
 
output
1/2*sqrt(2*I - 2)*log(-(I - 1)*sqrt(2*I - 2) + 2*sqrt(x + 1)) - 1/2*sqrt(2 
*I - 2)*log((I - 1)*sqrt(2*I - 2) + 2*sqrt(x + 1)) + 1/2*sqrt(-2*I - 2)*lo 
g((I + 1)*sqrt(-2*I - 2) + 2*sqrt(x + 1)) - 1/2*sqrt(-2*I - 2)*log(-(I + 1 
)*sqrt(-2*I - 2) + 2*sqrt(x + 1)) - 2*sqrt(x + 1)
 
3.15.67.6 Sympy [F]

\[ \int \frac {(1-x) \sqrt {1+x}}{1+x^2} \, dx=- \int \left (- \frac {\sqrt {x + 1}}{x^{2} + 1}\right )\, dx - \int \frac {x \sqrt {x + 1}}{x^{2} + 1}\, dx \]

input
integrate((1-x)*(1+x)**(1/2)/(x**2+1),x)
 
output
-Integral(-sqrt(x + 1)/(x**2 + 1), x) - Integral(x*sqrt(x + 1)/(x**2 + 1), 
 x)
 
3.15.67.7 Maxima [F]

\[ \int \frac {(1-x) \sqrt {1+x}}{1+x^2} \, dx=\int { -\frac {\sqrt {x + 1} {\left (x - 1\right )}}{x^{2} + 1} \,d x } \]

input
integrate((1-x)*(1+x)^(1/2)/(x^2+1),x, algorithm="maxima")
 
output
-integrate(sqrt(x + 1)*(x - 1)/(x^2 + 1), x)
 
3.15.67.8 Giac [A] (verification not implemented)

Time = 0.68 (sec) , antiderivative size = 157, normalized size of antiderivative = 0.78 \[ \int \frac {(1-x) \sqrt {1+x}}{1+x^2} \, dx=\sqrt {\sqrt {2} + 1} \arctan \left (\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} + 2 \, \sqrt {x + 1}\right )}}{2 \, \sqrt {-\sqrt {2} + 2}}\right ) + \sqrt {\sqrt {2} + 1} \arctan \left (-\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} - 2 \, \sqrt {x + 1}\right )}}{2 \, \sqrt {-\sqrt {2} + 2}}\right ) + \frac {1}{2} \, \sqrt {\sqrt {2} - 1} \log \left (2^{\frac {1}{4}} \sqrt {x + 1} \sqrt {\sqrt {2} + 2} + x + \sqrt {2} + 1\right ) - \frac {1}{2} \, \sqrt {\sqrt {2} - 1} \log \left (-2^{\frac {1}{4}} \sqrt {x + 1} \sqrt {\sqrt {2} + 2} + x + \sqrt {2} + 1\right ) - 2 \, \sqrt {x + 1} \]

input
integrate((1-x)*(1+x)^(1/2)/(x^2+1),x, algorithm="giac")
 
output
sqrt(sqrt(2) + 1)*arctan(1/2*2^(3/4)*(2^(1/4)*sqrt(sqrt(2) + 2) + 2*sqrt(x 
 + 1))/sqrt(-sqrt(2) + 2)) + sqrt(sqrt(2) + 1)*arctan(-1/2*2^(3/4)*(2^(1/4 
)*sqrt(sqrt(2) + 2) - 2*sqrt(x + 1))/sqrt(-sqrt(2) + 2)) + 1/2*sqrt(sqrt(2 
) - 1)*log(2^(1/4)*sqrt(x + 1)*sqrt(sqrt(2) + 2) + x + sqrt(2) + 1) - 1/2* 
sqrt(sqrt(2) - 1)*log(-2^(1/4)*sqrt(x + 1)*sqrt(sqrt(2) + 2) + x + sqrt(2) 
 + 1) - 2*sqrt(x + 1)
 
3.15.67.9 Mupad [B] (verification not implemented)

Time = 10.70 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.15 \[ \int \frac {(1-x) \sqrt {1+x}}{1+x^2} \, dx=\mathrm {atanh}\left (\frac {64\,\sqrt {2}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {x+1}}{256\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}-64}-\frac {64\,\sqrt {2}\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {x+1}}{256\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}-64}\right )\,\left (2\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}+2\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\right )-2\,\sqrt {x+1}-\mathrm {atanh}\left (\frac {64\,\sqrt {2}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {x+1}}{256\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}+64}+\frac {64\,\sqrt {2}\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {x+1}}{256\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}+64}\right )\,\left (2\,\sqrt {-\frac {\sqrt {2}}{4}-\frac {1}{4}}-2\,\sqrt {\frac {\sqrt {2}}{4}-\frac {1}{4}}\right ) \]

input
int(-((x - 1)*(x + 1)^(1/2))/(x^2 + 1),x)
 
output
atanh((64*2^(1/2)*(- 2^(1/2)/4 - 1/4)^(1/2)*(x + 1)^(1/2))/(256*(2^(1/2)/4 
 - 1/4)^(1/2)*(- 2^(1/2)/4 - 1/4)^(1/2) - 64) - (64*2^(1/2)*(2^(1/2)/4 - 1 
/4)^(1/2)*(x + 1)^(1/2))/(256*(2^(1/2)/4 - 1/4)^(1/2)*(- 2^(1/2)/4 - 1/4)^ 
(1/2) - 64))*(2*(- 2^(1/2)/4 - 1/4)^(1/2) + 2*(2^(1/2)/4 - 1/4)^(1/2)) - 2 
*(x + 1)^(1/2) - atanh((64*2^(1/2)*(- 2^(1/2)/4 - 1/4)^(1/2)*(x + 1)^(1/2) 
)/(256*(2^(1/2)/4 - 1/4)^(1/2)*(- 2^(1/2)/4 - 1/4)^(1/2) + 64) + (64*2^(1/ 
2)*(2^(1/2)/4 - 1/4)^(1/2)*(x + 1)^(1/2))/(256*(2^(1/2)/4 - 1/4)^(1/2)*(- 
2^(1/2)/4 - 1/4)^(1/2) + 64))*(2*(- 2^(1/2)/4 - 1/4)^(1/2) - 2*(2^(1/2)/4 
- 1/4)^(1/2))